import { defineStore } from 'pinia'
import { ref } from 'vue'

// import { storage } from './storage.js'

export const useUserStore = defineStore(
  'user',
  () => {
    // 登录状态
    const message = ref({})
    // 更新登录状态
    function setmessage(message) {
      message.value = message
    }
    return { message, setmessage }
  },
  {
    persist: {
      paths: ['message'],
    },
  }
)
